<!DOCTYPE html>
<!-- saved from url=(0076)http://www.uphsh.com/wap/ef73d9dc381d412f964b99e521c270a6/invoice?userToken= -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<base href="http://www.uphsh.com:80/">--><base href=".">


<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta content="telephone=no" name="format-detection">
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no">
<title>历史纪录</title>
<link type="text/css" href="../../resource/ystfiles/wapcommon.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="../../resource/ystfiles/fapiao.css">
<script src="../../resource/ystfiles/jquery180min.js" type="text/javascript"></script>
<script type="text/javascript" src="../../resource/ystfiles/wapcommon.js"></script>
<script src="../../resource/qrcode.js"></script>
	
	
<link rel="stylesheet" href="../../resource/ystfiles/weuimin.css">
<link rel="stylesheet" href="../../resource/ystfiles/example.css">
<script type="text/javascript" src="../../resource/ystfiles/api.js"></script>
<script type="text/javascript" src="../../resource/ystfiles/jweixin1002.js"></script>
<script type="text/javascript" src="../../resource/ystfiles/jweixin1.js"></script>
<script src="../../resource/jquery1.js"></script>
<script src="../../resource/qrcode.js"></script>
<script src="../../resource/jquerybarcode.js"></script>
<script src="../../script/api.js"></script>
<script src="../../resource/ystfiles/qrcode.js"></script>
<script src="../../resource/ystfiles/jquerybarcode.js"></script>
    <script type="text/javascript" src="../../script/constants.js"></script>
        <script type="text/javascript" src="../../script/tmd5.js"></script>
    <script type="text/javascript" src="../../script/aes.js"></script>
	<script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
	<script type="text/javascript" src="../../script/modeecb.js"></script>
    <style type="text/css">
        a.btn {
    width: 60px;
    line-height: 25px;
    display: block;
    text-align: center;
    font-size: 12px;
    background: rgba(51,51,51,0.3);
    color: #fff;
    border-radius: 5px;
		}
   .num {
   width: 60px;
   height:25px;
   color: #0000FF
   }
   #cac{   
    width:90%;
    height:100%;
    background:#f2f2f2;
    margin:0 auto;
    padding:10px;
	}
	#cac .c_show .s_text{
	    width:90%;
	    height:5%;
	    border:none;
	    line-height:5%;
	    text-align:right;
	    padding-right:20px;
	    font-size:34px;
	    color:#9e9e9e;
	}
	#cac h2{    
	    font-size:16px;
	    color:#000;
	    font-weight:500;
	    padding:12px 0 12px 20px;
	    cursor:move;
	}
	#cac .c_key ul{ 
	    border:3px solid #fff;
	    overflow:auto;
	    margin:2% auto;
	}
	#cac .c_key ul li{  
	    float:left;
	    width:18%;
	    height:3%;
	    background:#eaeaea;
	    margin:3%;
	    text-align:center;
	    line-height:300%;
	    font-size:18px;
	    cursor:pointer;
	    list-style:none;
	    border:1px solid #fff;
	}
	#cac .c_key ul .c_tool{ 
	    background:#738fd8;
	    color:#fff;
	}
	#cac .c_key ul .c_result{   
	    background:#f90;
	    color:#fff;
	}
	#cac .c_key ul li:hover{    
	    background:#fff;
	    color:#000;
	}
    </style>
    <style type="text/css">
    .LS_box{
	    width:100%;
	    height:64px;
	    background: #fff;
	    border-bottom:3px solid #E1E1E1;
    }
    .LS_box_img{
	    float:left;
	    width:12%;
	    text-align: center;
	    line-height: 64px;
	    margin-left:2%;
    }
    .LS_box_img img{
	   width:100%;
    }
    .LS_box_lsh{
	    float:left;
	    margin-top:8px;
	    margin-left:2%;
    }
    .LS_box_je{
	    float:right;
	    height:64px;
	    line-height:64px;
	    margin-right: 6%;
    }
    .LS_bt{
    heigth:24px;
    line-height: 24px;
    }
    .merselect {
		border: 0;
		appearance:none;
		background: #fff;
		color: #000;
		outline: medium none;
		width:100%;
		height:100%;
		font-size: 16px;
		text-align-last: right;
	}
	.merselect option{
	    direction: rtl;
	}
    </style>
</head>

<body style="background : #F1F1F1">
    <header id="statusBar">
		<div style="width:100%;display:table;background: #fff;position:fixed;border-bottom:1px solid #EAEAEA;z-index: 9999;height: 50px;" >
			<div style="float:left;width: 20%;height: 50px;line-height: 50px;" tapmode="presshover" onclick="api.closeWin();">
			  <div style="float:left;width: 30%;height: 50px;">
			   <img style="width: 24px;" src="../../image/blc_back.png" />
			   </div>
			   <div style="float:left;width: 50%;">
			   返回
			   </div>
			</div>
			<div style="float:left;width: 60%;height: 50px;line-height: 50px;text-align: center;font-weight:bold;">
			 历史纪录
			</div>
		</div>
	</header>
	
	<div style="height: 50px;"></div>
		<!-- 加载动画 -->
	<div id="loadingToast" style="display:none;">
			<div class="weui-mask_transparent"></div>
			<div class="weui-toast">
				<i class="weui-loading weui-icon_toast"></i>
				<p class="weui-toast__content">数据加载...</p>
			</div>
		</div>
		
		<div style="height:40px;line-height:40px;float: left;width: 29%;background: #ffffff;padding-left: 1%;">收款记录</div>
		<div style="float: right;display: table;height:40px;line-height:40px;width: 70%;">
		   <select id="seller" class="merselect" onchange = "changeMer();">
		   </select>
		</div>
		<div style="clear: both;"></div>
		<div id="weekAmount" style="height: 35px;line-height: 35px;background: #ffffff;width: 100%;margin-top: 10px;padding-left: 1%;">
		</div>
		<div id="FP_boxs" style="margin-top: 10px;">
          
	</div>
		<div style="text-align: center;bottom: 5px;font-size: 12px;margin-top: 30px"  >四川航天信息有限公司<br>客户热线：<a href="tel:95113" style="color: gray;">95113</a></div>
	</div>
	
</body>

<script>
    apiready = function(){
	    if(api.systemType == "ios"){
	       document.getElementById("statusBar").style.background = "#298cb4";
	    }
	    $api.fixStatusBar( $api.dom('header') );
		var merid = api.pageParam.merid;
		var merList = api.pageParam.merList;
	    for(var i=0;i<merList.length;i++ ){
	        if(merid == merList[i].MEMBERID){
	            $("#seller").append("<option value='"+merList[i].MEMBERID+"' selected>"+merList[i].MC+"</option>");
	        }else{
	            $("#seller").append("<option value='"+merList[i].MEMBERID+"'>"+merList[i].MC+"</option>");
	        }
	    }
		    $("#loadingToast").show();
		    var callback = function(ret, err){
		        if(ret){
			        if (ret.flag=="Y") {
			            var wa = "今日共收款："+ret.todayCount+"笔&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总金额："+ret.todayAmount+"元";
			            $("#weekAmount").html(wa);
	    			    xlist=ret.data;
                        var s = "";
			        	for(var i=0;i<xlist.length;i++){
		
							var LSH = xlist[i].ORDERID;
							var time = timestampToTime(xlist[i].NOTIFYTIME);
							var amt = xlist[i].AMOUNT;
							if(xlist[i].PAYWAY == "00"){
							   s += "<div class=\"LS_box\"><div class=\"LS_box_img\"><img src=\"../../image/jhzf/wx.png\"/></div>"
							}else{
							   s += "<div class=\"LS_box\"><div class=\"LS_box_img\"><img src=\"../../image/jhzf/zfb.png\"/></div>"
							}
						    s += "<div class=\"LS_box_lsh\">"
						          +"<div class=\"LS_bt\">"+LSH+"</div>"
						          +"<div class=\"LS_bt\">"+time+"</div>"
						          +"</div><div class=\"LS_box_je\">"
						          +"<h1>"+amt+"</h1>"
						          +"</div></div>";
			        	}
			        	$("#FP_boxs").html(s);
			        	$("#loadingToast").hide();
	   			 } else{
	   			    $("#loadingToast").hide();
	   			    api.alert({msg: ret.msg});
	   			 }
   			 }else{
   			    $("#loadingToast").hide();
				api.alert({msg: JSON.stringify(err)});
   			 }
		    }
		    var content = {"memberid":merid,"phone":$api.getStorage("dl_phone")};
		    apiAjax(JSON.stringify(content),url.todayYlRecord,callback);
		}

    function changeMer(){
         var value = $("#seller").val();
         var callback = function(ret, err){
                console.log(JSON.stringify(ret));
		      if(ret){
		            var s = "";
			        if (ret.flag=="Y") {
			            var wa = "今日共收款："+ret.todayCount+"笔&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;总金额："+ret.todayAmount+"元";
			            $("#weekAmount").html(wa);
	    			    xlist=ret.data;
			        	for(var i=0;i<xlist.length;i++){
		
							var LSH = xlist[i].ORDERID;
							var time = timestampToTime(xlist[i].NOTIFYTIME);
							var amt = xlist[i].AMOUNT;
		                    if(xlist[i].PAYWAY == "00"){
							   s += "<div class=\"LS_box\"><div class=\"LS_box_img\"><img src=\"../../image/jhzf/wx.png\"/></div>"
							}else{
							   s += "<div class=\"LS_box\"><div class=\"LS_box_img\"><img src=\"../../image/jhzf/zfb.png\"/></div>"
							}
						    s += "<div class=\"LS_box_lsh\">"
						          +"<div class=\"LS_bt\">"+LSH+"</div>"
						          +"<div class=\"LS_bt\">"+time+"</div>"
						          +"</div><div class=\"LS_box_je\">"
						          +"<h1>"+amt+"</h1>"
						          +"</div></div>";
			        	}
			        	$("#loadingToast").hide();
	   			    } else{
	   			        $("#loadingToast").hide();
	   			        api.alert({msg: ret.msg});
	   			    }
	   			    $("#FP_boxs").html(s);
   			 }else{
   			    $("#loadingToast").hide();
				api.alert({msg: JSON.stringify(err)});
   			 }
		    }
		    var content = {"memberid":value,"phone":$api.getStorage("dl_phone")};
		    apiAjax(JSON.stringify(content),url.todayYlRecord,callback);
    }

    function timestampToTime(timestamp) {
        var date = new Date(timestamp); //获取一个时间对象
		var Y =	date.getFullYear()+""; // 获取完整的年份(4位,1970)
		var M =	(date.getMonth()+1)+""; // 获取月份(0-11,0代表1月,用的时候记得加上1)
		var D =	date.getDate()+""; // 获取日(1-31)
		var ms = date.getTime()+""; // 获取时间(从1970.1.1开始的毫秒数)
		var h =	date.getHours(); // 获取小时数(0-23)
		var m =	date.getMinutes(); // 获取分钟数(0-59)
		var s =	date.getSeconds(); 
		if(M<10){
		   M = "0"+M;
		}if(D<10){
		   D = "0"+D;
		}
		if(h<10){
		   h = "0"+h;
		}
		if(m<10){
		   m = "0"+m;
		}
		if(s<10){
		   s = "0"+s;
		}
        return Y+"-"+M+"-"+D+" "+h+":"+m+":"+s;
    }

	function toindex(){
        api.closeWin();
	}


</script>

</html>
